<%@page import="sever.AdminService"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   <%@page import="entity.*"%>
   <%@page import="sever.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录验证</title>
</head>
<body>
           <%
           request.setCharacterEncoding("utf-8");//解决汉字乱码
           String name=request.getParameter("username");
           out.print("name="+name);
           String pass=request.getParameter("pass");
           out.print("pass="+pass);
            AdminService adminService= new  AdminService();
           Admin admin=adminService.login(name, pass);
           %>
           <%
               if(admin!=null){
            	   //记录信息
            	   
            	  session.setAttribute("name", admin);
            	  response.sendRedirect("Yanzheng3.jsp");
            	  return;
               }
           response.sendRedirect("Yanzheng.jsp?msg==error  input");
            

            %>
</body>
</html>